package com.dk.service.impl;

import com.dk.VO.TbCarsVO;
import com.dk.VO.TbOrderVO;
import com.dk.mapper.TbCarsMapper;
import com.dk.pojo.TbCars;
import com.dk.service.TbCarsService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class TbCarsServiceImpl implements TbCarsService {

    @Resource
    private TbCarsMapper carsMapper;

    @Override
    public TbCarsVO getAll(Long cid) {
        TbCars cars = carsMapper.selectById(cid);
        TbCarsVO carsVO = new TbCarsVO();
        BeanUtils.copyProperties(cars, carsVO);
        return carsVO;
    }
}
